<?php

$ini_array = parse_ini_file((($envConfig) ? $envConfig : "dev") . "Config.properties", true);
$coreAutoloadPath = $ini_array["symfony"]["core_autoload_path"];
require_once (("prod" == $envConfig) ? dirname(__FILE__) : "") . $coreAutoloadPath;

sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration {
    
    static protected $env;

    public function setup() {
        $ini_array = parse_ini_file(((self::$env) ? self::$env : "dev") . "Config.properties", true);
        $webDir = $ini_array["symfony"]["web_dir"];
        $this->setWebDir(sfConfig::get('sf_root_dir') . $webDir);

        $this->enablePlugins(array('sfPropelPlugin',
            'fusaInternacionalizacionPlugin'));

        $this->enablePlugins('sfJQueryUIPlugin');
        $this->enablePlugins('sfGuardPlugin');
        $this->enablePlugins('sfJqueryReloadedPlugin');
      $this->enablePlugins('sfFormExtraPlugin');
  }

    public static function getApplicationConfiguration($application, $environment, $debug, $rootDir = null, sfEventDispatcher $dispatcher = null) {
        self::$env = $environment;
        return parent::getApplicationConfiguration($application, $environment, $debug, $rootDir, $dispatcher);
    }

}
